package org.jeecg.modules.fund.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.jeecg.common.base.BaseMap;
import org.jeecg.modules.fund.entity.FundLibrary;
import org.jeecg.modules.fund.entity.FundOptional;
import org.jeecg.modules.fund.entity.FundValue;

import java.util.List;
import java.util.Map;

public interface FundOptionalMapper extends BaseMapper<FundOptional> {
    /**
     * 获取自选列表
     * @param userId
     * @param page
     * @param size
     * @return
     */
    Map<String,Object> findList(@Param("userId") String userId, @Param("page") Integer page, @Param("size") Integer size);


    /**
     * 获取自选分页
     * @param page
     * @param library
     * @return
     */
    IPage<Map<String,Object>> selectPageVo(IPage<FundLibrary> page,@Param("library") FundLibrary library);

    /**
     * 获取自选净值列表
     * @param tableName
     * @param fundId
     * @param startDate
     * @param endDate
     * @return
     */
    List<Map<String,Object>> findOptionalValueList(@Param("tableName") String tableName, @Param("fundId") String fundId, @Param("startDate") String startDate, @Param("endDate") String endDate);

    /**
     * 查询波段
     * @param tableName
     * @param fundId
     * @return
     */
    List<FundValue> queryWave(@Param("tableName") String tableName, @Param("fundId") String fundId);

    /**
     * 提示统计
     * @param userId
     * @return
     */
    List<Map<String,Object>> tipCount(String userId);
}
